package com.ymatou.iapi.liveseller.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.database.model.LiveRoom;
import com.ymttest.utils.EnvSetup;
/**
*获取直播商品限制数Call
*FreeMaker Template自动生成代码
*/
public class GetCountByLiveIdCall extends YmatouBaseCall{
	private static String opurl ="api/live/GetCountByLiveId";
	
	public GetCountByLiveIdCall() {
		super(EnvSetup.getSystemUrl("liveseller_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	/**
	 * 已经存在商品手机
	 * @return
	 */
	public int getExistsProductCount(){
		return getJsonObject().get("Data").getAsJsonObject().get("CountDto").getAsJsonObject().get("ExistsProductCount").getAsInt();
	}
	/**商品限制总数
	 * @return
	 */
	public int getLimitProductCount(){
		return getJsonObject().get("Data").getAsJsonObject().get("CountDto").getAsJsonObject().get("LimitProductCount").getAsInt();
	}
}